package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiT_goods_topic_link;

//DAO
public interface T_goods_topic_linkMapperBase {

	// 根据id查看
	@Select("SELECT * FROM T_GOODS_TOPIC_LINK  WHERE TOPIC_LINK_ID = #{topic_link_id}")
	public ApiT_goods_topic_link findT_goods_topic_linkById(Integer topic_link_id);

	// 查看数据集
	@Select("SELECT * FROM T_goods_topic_link")
	public List<ApiT_goods_topic_link> findT_goods_topic_links();

	// 根据条件查看数据集
	public List<Map<String, Object>> findT_goods_topic_linksByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO T_GOODS_TOPIC_LINK (TOPIC_ID, GOODS_ID, PRODUCT_ID, TYPE_ID, EXT_1, EXT_2, EXT_3, EXT_4, EXT_5) VALUES (#{topic_id}, #{goods_id}, #{product_id}, #{type_id}, #{ext_1}, #{ext_2}, #{ext_3}, #{ext_4}, #{ext_5})")
	@Options(useGeneratedKeys = true, keyProperty = "topic_link_id")
	public int insertT_goods_topic_link(ApiT_goods_topic_link t_goods_topic_link);

	// 修改
	@Update("UPDATE T_GOODS_TOPIC_LINK SET TOPIC_ID = #{topic_id}, GOODS_ID = #{goods_id}, PRODUCT_ID = #{product_id}, TYPE_ID = #{type_id}, EXT_1 = #{ext_1}, EXT_2 = #{ext_2}, EXT_3 = #{ext_3}, EXT_4 = #{ext_4}, EXT_5 = #{ext_5} WHERE TOPIC_LINK_ID = #{topic_link_id}")
	public int updateT_goods_topic_link(ApiT_goods_topic_link t_goods_topic_link);

	// 删除
	@Delete("DELETE FROM T_GOODS_TOPIC_LINK  WHERE TOPIC_LINK_ID = #{topic_link_id}")
	public int deleteT_goods_topic_link(Integer topic_link_id);

	// Foreign keys revelant

	// region Indexs revelant

}
